/**
 * @author xh
 * 懒汉模式（线程安全）
 */
public class Wife3 {
    private static Wife3 wife;
    private Wife3(){};
    public static synchronized Wife3 getWife() {
        if(wife == null) {
            wife = new Wife3();
        }
        return wife;
    }
}
